package io.characterStream.fileRorW.test;

import java.io.*;

public class test2 {
    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();
        //创建字节缓冲输入流
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("E:\\Desktop\\20-7毕业照.jpg"));
        //创建字节缓存输出流
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("E:\\javaFileTest\\20-7毕业照.jpg"));
        int i;
        while((i = bis.read())!=-1){
            bos.write(i);
        }
        bis.close();
        bos.close();
        long end = System.currentTimeMillis();
        System.out.println(end-start);
    }
}
